#ifndef _FREERTOS_FORWARD_H_
#define _FREERTOS_FORWARD_H_
#include <avr/io.h>
#include "define.h"



#define		TURNLEFT_NO			0
#define		TURNLEFT_START		1
#define		TURNLEFT_STATE1		2
#define		TURNLEFT_STATE2		3
#define		TURNLEFT_DONE		4

#define		TURNRIGHT_NO		0
#define		TURNRIGHT_START		1
#define		TURNRIGHT_STATE1	2
#define		TURNRIGHT_STATE2	3
#define		TURNRIGHT_DONE		4

#define		PULL_UP				5
#define		PULL_DOWN			6

#define 	FWD_E_NO			0
#define		FWD_E_START			1
#define		FWD_E_STATE0		2
#define		FWD_E_STATE1		3
#define		FWD_E_DONE			4





void dc3_speed(int x);
void turnleft_process(unsigned char *_function_left,int *velctl_L,int *velctl_R, unsigned char *hold_velocity_flag,unsigned char *delay_times);
void turnright_process(unsigned char *_function_right,int *velctl_L,int *velctl_R, unsigned char *hold_velocity_flag);
void run_forward_vel_encoder(unsigned char *_function_forward_e,int length,
								int *velctl_L, int *velctl_R, unsigned char *hold_velocity_flag, int vel);

#endif //FREERTOS_FORWARD_H